import React from 'react'
import './App.less'
import { Route, Switch } from 'react-router-dom'
import { E_ROUTE_PATH } from './router/route-path'
import Register from './views/register/Register'
import Login from './views/login/Login'
import PrivateRoute from './router/PrivateRoute'
import AppHeader from './components/header/AppHeader'
import Home from './views/home/Home'
import Main from '@/views/main/Main'

function App() {
  return (
    <div className="App">
      <AppHeader />
      <div className="app-main">
        <Switch>
          <Route exact path={E_ROUTE_PATH.REGISTER}>
            <Register />
          </Route>
          <Route exact path={E_ROUTE_PATH.LOGIN}>
            <Login />
          </Route>
          <Route exact path={E_ROUTE_PATH.HOME}>
            <Home />
          </Route>
          <PrivateRoute path={E_ROUTE_PATH.MAIN}>
            <Main />
          </PrivateRoute>
        </Switch>
      </div>
    </div>
  )
}

export default App
